Skip to content

Conversation

tejasgn1
Copy link
Contributor

@tejasgn1 tejasgn1 commented Oct 8, 2025

This PR takes care of AI code generation using CodeLoom. CodeLoom now also works with Bedrock Knowledge Bases

@tejasgn1 tejasgn1 added the Tools This issue relates to a custom tooling to streamline development tasks label Oct 8, 2025
@tejasgn1 tejasgn1 changed the title CodeLoom-4-bedrock CodeLoom-4-Bedrock Oct 8, 2025
@github-actions github-actions bot removed the Tools This issue relates to a custom tooling to streamline development tasks label Oct 9, 2025
# Check if python/test_tools/{service}_stubber.py exists
# If missing, create it following existing patterns
# Add to python/test_tools/stubber_factory.py
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the service to the stubber factory If statement.

#### Hello Scenario Structure
- **File naming**: `{service}_hello.py` or hello function in main module
- **Function naming**: `hello_{service}()` or `main()`
- **Documentation**: Include docstrings explaining the hello example purpose
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use wrapper functions for the hello example.

- **Functions**: Use descriptive names with snake_case
- **Classes**: Use PascalCase for class names
- **Constants**: Use UPPER_CASE for constants
- **Type Hints**: Include type annotations where beneficial
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use paginators when available.


3. **Test File Structure:**
- **Unit Tests**: `test_{service}_wrapper.py` - Test wrapper class methods with mocked responses
- **Integration Tests**: `test_{service}_integration.py` - Test against real AWS services (marked with `@pytest.mark.integ`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write one integration test that runs the entire scenario.

- **Test markers**: Use `@pytest.mark.integ` for integration tests
- **Fixtures**: Create reusable fixtures for AWS resources
- **Cleanup**: Ensure proper resource cleanup in tests
- **Mocking**: Use `boto3` stubber for unit tests when appropriate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use MonkeyPatch mockers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants